public class J5luoji {
    public static void main(String[] args) {
        int a = 7;
//        System.out.println(a);
        System.out.println(true&true);//true
        System.out.println(true&false);//false
        System.out.println(false&true);//false

        System.out.println(true|false);//true
        System.out.println(false|false);//false


        System.out.println("==异或^=逻辑电路==");
        System.out.println(true^false);//true
        System.out.println(true^true);//false


        System.out.println(!true);//false
        System.out.println(!false);//true
        boolean bx = true;
        bx = !bx;
        System.out.println("bx = " + bx);//false
    }
}

class J5luoji2{
    public static void main(String[] args) {
        System.out.println(true && true);//true
        System.out.println(true && false);//false
        //短路功能
        System.out.println(false && true);//false

        System.out.println((3>4) && (4>3));
        System.out.println("=======");
        int a = 3;
        //&没有短路功能
//        System.out.println(false & (a++>0));//false
        System.out.println(false && (a++>0));//false
        System.out.println("a = " + a);//4  3

        // | ||
        System.out.println(true | false);//true
        int b = 2;
//        System.out.println(true | b++<0);//true
        System.out.println(true || b++<0);//true
        System.out.println("b = " + b);//3  2

//        System.out.println(1&4);
    }
}